<!--grid-->
<br>
<div class="lead-download-activity">
    <div class="grid-header">
        <div class="grid-title" *ngFor="let column of columns">{{column.title}}</div>
    </div>
    <div class="grid-container">
        <div class="grid-item" *ngFor="let row of rows">
            <div class="grid-itemInfo">{{row.activityId}}</div>
            <div class="grid-itemInfo">{{row.updatedTime*1000 | date:'yyyy-MM-dd HH:mm:ss'}}</div>
            <div class="grid-itemInfo">{{row.activityName}}</div>
            <div class="grid-itemInfo"><a href="{{row.url}}" target="_blank">{{row.url}}</a></div>
            <div class="grid-itemInfo">{{row.activityTypeName}}</div>
            <div class="grid-itemInfo">
                <button class="action-btn btn-invalid" (click)="IsEnable(row.activityId, row.enabled, row.activityName)" *ngIf="row.enabled == 0">目前禁用</button>
                <button class="action-btn" (click)="IsEnable(row.activityId, row.enabled, row.activityName)" *ngIf="row.enabled == 1">目前启用</button>
            </div>
            <div class="grid-itemInfo">
                <button class="action-btn" (click)="openEditModal(row.activityId)">编辑</button>
                <button class="action-btn" (click)="copyActivity(row.activityId)">复制</button>
            </div>
        </div>
    </div>
    <pagination *ngIf="rows" class="pagination-sm" [(ngModel)]="page" [totalItems]="totalItems" [itemsPerPage]="itemsPerPage"
        [maxSize]="maxSize" [boundaryLinks]="true" [rotate]="false" [firstText]="localText.firstBtn" [lastText]="localText.lastBtn"
        [previousText]="localText.previousBtn" [nextText]="localText.nextBtn" (pageChanged)="onChangeTable($event)" (numPages)="numPages = $event">
    </pagination>
    <pre *ngIf="rows" class="card card-block card-header">页数: {{page}} / {{numPages}}</pre>
</div>